home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2006 September
/
PCWorld_2006-09_cd.bin
/
v cisle
/
hexer
/
mpth_17.exe
/
{app}
/
scripts
/
Fill Data.mps
< prev
next >
Wrap
Text File
|
2006-04-30
|
3KB
|
135 lines
INCLUDE '*.lng'
= fill with calculated data
option globalvars 1
var start dword count dword increment qword editorf file size byte
var val1 byte val2 word val4 dword val8 qword
if currentfile == ""
editorf = fileopen('::new','c')
else
editorf = fileopen('::current', 'rw')
endif
number_radix = 10
number_prefix = ''
number_suffix = ''
start = dword(input(__FF1__,__FF2__,text(filegetprop(editorf, 'selstart'))))
if filegetprop(editorf, 'selcount') == 0
count = filesize(editorf) - start
else
count = filegetprop(editorf, 'selcount')
endif
size = byte(bytestring(input(__FF1__, __FF3__, "1")))
count = dword(bytestring(input(__FF1__, __FF4__, Text(count/size))))
val8 = qword(bytestring(input(__FF1__,__FF5__,'0')))
increment = qword(bytestring(input(__FF1__,__FF6__,'1')))
val1=val8:val2=val8:val4=val8
var cnt dword pc qword
pc = filepos(editorf)-start
if size==8
cnt = (count *8) +start
fileseek editorf (cnt-1)
fileseek editorf start
if increment == 1
loop schleife81 count
else
loop schleife8 count
endif
else
if size==4
cnt = (count *4) +start
fileseek editorf (cnt-1)
fileseek editorf start
if increment == 1
loop schleife41 count
else
loop schleife4 count
endif
else
if size==2
cnt = (count *2) +start
fileseek editorf (cnt-1)
fileseek editorf start
if increment == 1
loop schleife21 count
else
loop schleife2 count
endif
else
cnt = count +start
fileseek editorf (cnt-1)
fileseek editorf start
if increment == 1
loop schleife11 count
else
loop schleife1 count
endif
endif
endif
endif
showprogress 100, 100
fileclose editorf
end
@@schleife1
filewrite editorf val1
inc val1, increment
showprogress cnt, pc
inc pc
return
@@schleife2
filewrite editorf val2
inc val2, increment
showprogress cnt, pc
inc pc, 2
return
@@schleife4
filewrite editorf val4
inc val4, increment
showprogress cnt, pc
inc pc,4
return
@@schleife8
filewrite editorf val8
inc val8, increment
showprogress cnt, pc
inc pc,8
return
@@schleife11
filewrite editorf val1
inc val1
showprogress cnt, pc
inc pc
return
@@schleife21
filewrite editorf val2
inc val2
showprogress cnt, pc
inc pc, 2
return
@@schleife41
filewrite editorf val4
inc val4
showprogress cnt, pc
inc pc,4
return
@@schleife81
filewrite editorf val8
inc val8
showprogress cnt, pc
inc pc,8
return